from django.conf.urls.defaults import *
from django.conf import settings
from os import path

urlpatterns = patterns('',
    (r'^dlog/', include('dlog.dlogcore.urls')),
    
    # site image files. Can index directory only when DEBUG is true.
    (r'^dlog/img/(?P<path>.*)$', 'django.views.static.serve', 
        {
              'document_root': path.join(settings.MEDIA_ROOT, 'image'), 
              'show_indexes': settings.DEBUG
          }),

    # site image files. Can index directory only when DEBUG is true.
    (r'^dlog/js/(?P<path>.*)$', 'django.views.static.serve', 
        {
              'document_root': path.join(settings.MEDIA_ROOT, 'javascript'), 
              'show_indexes': settings.DEBUG
          }),

    # site image files. Can index directory only when DEBUG is true.
    (r'^dlog/css/(?P<path>.*)$', 'django.views.static.serve', 
        {
              'document_root': path.join(settings.MEDIA_ROOT, 'stylesheet'), 
              'show_indexes': settings.DEBUG
          }),

    (r'^dlog/admin/', include('django.contrib.admin.urls')),
)
